<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8" isELIgnored="false"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport"
	content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta name="renderer" content="webkit">
<title>学生信息</title>
<link
	href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css"
	rel="stylesheet">
<!-- 可选的Bootstrap主题文件（一般不使用） -->
<script
	src="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap-theme.min.css"></script>
<link rel="stylesheet"
	href="${pageContext.request.contextPath}/css/pintuer.css">
<link rel="stylesheet"
	href="${pageContext.request.contextPath}/css/admin.css">
<script src="${pageContext.request.contextPath}/js/jquery.js"></script>
<script src="${pageContext.request.contextPath}/js/pintuer.js"></script>
<link rel="stylesheet"
	href="${pageContext.request.contextPath}/css/toastr.css">
<script src="${pageContext.request.contextPath}/js/toastr.min.js"></script>
</head>
<body>
	<div class="panel admin-panel">
		<div class="panel-head">
			<strong><span class="icon-pencil-square-o"></span> 个人校内信息</strong>
		</div>
		<table class="table" style="margin: 10px;">
			<tr>
				<td>工号:&nbsp;&nbsp;&nbsp;${info.id}</td>
				<td>姓名:&nbsp;&nbsp;&nbsp;<input type="text" class="name"
					value="${info.name}"></td>
				<td>性别:&nbsp;&nbsp;&nbsp;<input type="text" class="gender"
					value="${info.gender}"></td>

			</tr>
			<tr>
				<td>年龄:&nbsp;&nbsp;&nbsp;<input type="text" class="age"
					value="${info.age}"></td>
				<td>学院:&nbsp;&nbsp;&nbsp;<input type="text" class="colleage"
					value="${info.colleage}" /></td>
			
				<td>联系电话:&nbsp;&nbsp;&nbsp;<input type="text" class="phone"
					value="${info.phone}"></td>
			</tr>
			
		</table>

	
		<div class="body-content">
			<div style="text-align: center">
				<button class="button border-main" onclick="savaChange()">提交</button>
			</div>
		</div>
		<script type="text/javascript">
			function savaChange() {
				$.ajax({
					data : {
						"id":"${info.id}",
						"name" : $(".name").val(),
						"gender" : $(".gender").val(),
						"age" : $(".age").val(),
						"phone" : $(".phone").val(),
						"colleage" : $(".colleage").val(),
					},
                   type:"POST",
                   url:"/BookStoreManager/reader/updateReaderMessage",
                   success:function(data){
       					if(data.result=="修改成功"){
       						toastr.options.positionClass = 'toast-center-center';
       						toastr.success("修改成功");
       					}
       					else{
       						toastr.options.positionClass = 'toast-center-center';
       						toastr.error("修改失败");
       					}
       				}
       				
				})
			}
		</script>
</body>
</html>